package com.rasou;

import org.geektimes.event.EventListener;
import org.geektimes.event.distributed.DistributedEventObject;

import java.util.EventObject;

public abstract class AbstractListener implements EventListener {

    @Override
    public void onEvent(EventObject event) {
        if (event instanceof DistributedEventObject) {
            sendToRemote(event);
        }
    }

    protected abstract void sendToRemote(EventObject event);
}
